<div class="boxer" style="width: 1700px; height: 577px;">
<div class="box">
	<div class="canshu-set backfff">
	<form action="" method="post">
		<table border="0" cellspacing="0" cellpadding="0" class="margin_ten">
			<tr>
				<td width="180">评论权限设置</td>
				<td>
					<select name="access" id="quanxian">
						<option value="1" {{if eq .row.Access 1}}selected="selected"{{end}}>游客</option>
						<option value="2" {{if eq .row.Access 2}}selected="selected"{{end}}>登录用户</option>
						<option value="3" {{if eq .row.Access 3}}selected="selected"{{end}}>认证用户</option>
					</select>
				</td>
			</tr>

			<tr>
				<td>内容字数限制</td>
				<td><input type="text" class="t" name="contentsize" value="{{.row.ContentSize}}" /><em>个汉字</em></td>
			</tr>
			<tr>
				<td>评论时间间隔</td>
				<td><input type="text" class="t" name="timeinterval" value="{{.row.TimeInterval}}" /><em>秒</em></td>
			</tr>
			<tr>
				<td>评论验证码</td>
				<td>
					<input type="radio" class="hid" name="authcode" id="yzm-open" value="1" {{if eq .row.AuthCode 1}}checked="checked"{{end}} /><label for="yzm-open" class="{{if eq .row.AuthCode 1}}selected{{end}}">开启</label>
					<input type="radio" class="hid" name="authcode" id="yzm-close" value="0" {{if eq .row.AuthCode 0}}checked="checked"{{end}} /><label for="yzm-close"  class="{{if eq .row.AuthCode 0}}selected{{end}}">关闭</label>
				</td>
			</tr>
			<tr>
				<td>是否需要审核</td>
				<td>
					<input type="radio" class="hid" name="audit" id="sh-open" value="1" {{if eq .row.Audit 1}}checked="checked"{{end}} /><label for="sh-open" class="{{if eq .row.Audit 1}}selected{{end}}">是</label>
					<input type="radio" class="hid" name="audit" id="sh-close" value="0" {{if eq .row.Audit 0}}checked="checked"{{end}} /><label for="sh-close" class="{{if eq .row.Audit 0}}selected{{end}}">否</label>
				</td>
			</tr>
			<tr>
				<td>评论默认排序方式</td>
				<td>
					<input type="radio" class="hid" name="sort" id="order-time" value="1" {{if eq .row.Sort 1}}checked="checked"{{end}}/><label for="order-time" class="{{if eq .row.Sort 1}}selected{{end}}">评论时间排序</label>
					<input type="radio" class="hid" name="sort" id="order-hot" value="0" {{if eq .row.Sort 0}}checked="checked"{{end}}/><label for="order-hot" id="order-hot-open" class="{{if eq .row.Sort 0}}selected{{end}}">按热度排序</label>
				</td>
			</tr>
			<tr class="{{if eq .row.Sort 1}}hid{{end}}" id="order-hot-row">
				<td>按时间排序方式</td>
				<td>
					<input type="radio" class="hid" name="timesort" id="time-new" value="1" {{if eq .row.TimeSort 1}}checked="checked"{{end}} /><label for="time-new" class="{{if eq .row.TimeSort 1}}selected{{end}}">新评论至于顶部</label>
					<input type="radio" class="hid" name="timesort" id="time-old" value="0" {{if eq .row.TimeSort 0}}checked="checked"{{end}}/><label for="time-old" class="{{if eq .row.TimeSort 0}}selected{{end}}">旧评论至于顶部</label>
				</td>
			</tr>
			<tr>
				<td>是否允许点赞</td>
				<td>
					<input type="radio" class="hid" name="islike" id="zan-open" value="1" {{if eq .row.IsLike 1}}checked="checked"{{end}} /><label for="zan-open" class="{{if eq .row.IsLike 1}}selected{{end}}">是</label>
					<input type="radio" class="hid" name="islike" id="zan-close" value="0" {{if eq .row.IsLike 0}}checked="checked"{{end}}/><label for="zan-close" class="{{if eq .row.IsLike 0}}selected{{end}}">否</label>
				</td>
			</tr>
			<tr>
				<td>是否允许分享</td>
				<td>
					<input type="radio" class="hid" name="isshare" id="share-open" value="1" {{if eq .row.IsShare 1}}checked="checked"{{end}} /><label for="share-open" class="{{if eq .row.IsShare 1}}selected{{end}}">是</label>
					<input type="radio" class="hid" name="isshare" id="share-close" value="0" {{if eq .row.IsShare 0}}checked="checked"{{end}} /><label for="share-close" class="{{if eq .row.IsShare 0}}selected{{end}}">否</label>
				</td>
			</tr>
			<tr>
				<td>是否允许举报</td>
				<td>
					<input type="radio" class="hid" name="isreport" id="jubao-open" value="1" {{if eq .row.IsReport 1}}checked="checked"{{end}}/><label for="jubao-open" class="{{if eq .row.IsReport 1}}selected{{end}}">是</label>
					<input type="radio" class="hid" name="isreport" id="jubao-close" value="0" {{if eq .row.IsReport 0}}checked="checked"{{end}}/><label for="jubao-close" class="{{if eq .row.IsReport 0}}selected{{end}}">否</label>
				</td>
			</tr>
			<tr class="tishi" style="display: none;">
				<td colspan="3" class="btn" style="color: red;text-align: left;">
					
				</td>
			</tr>

			<tr>
				<td colspan="2" class="btn">
				{{if haspermission 1 "set:update"}}
				<input type="submit" name="submit" value="确定" />
				<button type="reset" class="cancel reset">取消</button>
				{{end}}
				</td>
			</tr>
		</table>
	</from>
	</div>
</div>
</div>
<script type="text/javascript">
jQuery(function($){
	nku.droplist.config({'theme':'win7'}).play('quanxian');
	var err = {{.err}}
	if(err){
		var errMsg = "";
		$.each(err, function(index, value, array) {
			errMsg += index+": "+value+"<br />"
		});
		$(".tishi").show().children("td").html(errMsg);
	}
	var ok = {{.ok}}
	if(ok){
		alert(ok);
	}
	$(".canshu-set label").on("click",function(){
		$(this).parent().children("label").each(function(){
			if ($(this).attr("class")=="selected") {
				$(this).removeClass();
				if ($(this).attr("id")=="order-hot-open") {
					$("#order-hot-row").hide();
				}
			} else {
				$(this).addClass("selected");
				if ($(this).attr("id")=="order-hot-open") {
					$("#order-hot-row").show();
				}
			}
		});
	});
	$(".reset").click(function (){
		location.href='/parametset/set/1';
	})
	
});
</script>